<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Renderer - Documentation</title>

    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav>
    <li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Modules</li><li class="nav-heading"><span class="nav-item-type type-module">M</span><span class="nav-item-name"><a href="module-ipcInit.html">ipcInit</a></span></li><li class="nav-heading"><span class="nav-item-type type-module">M</span><span class="nav-item-name"><a href="module-Main.html">Main</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-Main.html#~createWindow">createWindow</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-Main.html#~startApp">startApp</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-Main.html#~startNode">startNode</a></span></li><li class="nav-heading"><span class="nav-item-type type-module">M</span><span class="nav-item-name"><a href="module-Renderer.html">Renderer</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-Renderer.html#~fetchParameters">fetchParameters</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="module-Renderer.html#~myInit">myInit</a></span></li><li class="nav-heading">Events</li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="module-Main.html#~event:data">data</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="module-Main.html#~event:msg">msg</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="module-Main.html#~event:parameters_response">parameters_response</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="module-Main.html#~event:patrol-plan">patrol-plan</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="module-Main.html#~event:rosdata">rosdata</a></span></li>
</nav>

<div id="main">
    
    <h1 class="page-title">Renderer</h1>
    

    




<section>

<header>
    
        
            
        
    
</header>

<article>
    <div class="container-overview">
    
        
            <div class="description">Renderer for this application.</div>
        

        
            
<div class="section-method">







<dl class="details">

    

    

    

    

    

    

    

    

    
    <dt class="tag-author">Author:</dt>
    <dd class="tag-author">
        <ul>
            <li>Edouard Denomme &lt;></li>
        
            <li>Cedric Godin &lt;></li>
        
            <li>Edouard Legare &lt;></li>
        </ul>
    </dd>
    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="renderer.js.html">renderer.js</a>, <a href="renderer.js.html#line2">line 2</a>
    </li></ul></dd>
    

    

    

    
</dl>























</div>
        
    
    </div>

    

    

    

     

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<div class="section-members">
<h4 class="name" id="~operatorID"><span class="type-signature">(inner) </span>operatorID<span class="type-signature"> :number</span></h4>




<div class="description">
    Keep track of the operator id.
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="renderer.js.html">renderer.js</a>, <a href="renderer.js.html#line15">line 15</a>
    </li></ul></dd>
    

    

    

    
</dl>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><code>number</code></span>


        </li>
    </ul>





</div>

        
            
<div class="section-members">
<h4 class="name" id="~streamNames"><span class="type-signature">(inner, constant) </span>streamNames<span class="type-signature"> :Array</span></h4>




<div class="description">
    Array to keep track of the virtual devices corrected name.
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="renderer.js.html">renderer.js</a>, <a href="renderer.js.html#line27">line 27</a>
    </li></ul></dd>
    

    

    

    
</dl>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><code>Array</code></span>


        </li>
    </ul>





</div>

        
            
<div class="section-members">
<h4 class="name" id="~virtualDevicesName"><span class="type-signature">(inner, constant) </span>virtualDevicesName<span class="type-signature"> :Array</span></h4>




<div class="description">
    Virtual devices names.
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="renderer.js.html">renderer.js</a>, <a href="renderer.js.html#line21">line 21</a>
    </li></ul></dd>
    

    

    

    
</dl>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><code>Array</code></span>


        </li>
    </ul>





</div>

        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            
<div class="section-method">

    

    <h4 class="name" id="~fetchParameters"><span class="type-signature">(inner) </span>fetchParameters<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Use to fetch the parameters from main
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="renderer.js.html">renderer.js</a>, <a href="renderer.js.html#line78">line 78</a>
    </li></ul></dd>
    

    

    

    
</dl>























</div>
        
            
<div class="section-method">

    

    <h4 class="name" id="~myInit"><span class="type-signature">(inner) </span>myInit<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Main function of the renderer; set all callback for easyrtc, connect the robot to the easyrtc
server and configure the 2 video stream.
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="renderer.js.html">renderer.js</a>, <a href="renderer.js.html#line109">line 109</a>
    </li></ul></dd>
    

    

    

    
</dl>























</div>
        
    

    
        <h3 class="subsection-title">Type Definitions</h3>

        
                
<div class="section-method">

    

    <h4 class="name" id="~acceptCall"><span class="type-signature"></span>acceptCall<span class="signature">(easyrtcid, acceptor)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback of the accept checker of easyrtc
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="renderer.js.html">renderer.js</a>, <a href="renderer.js.html#line92">line 92</a>
    </li></ul></dd>
    

    

    

    
</dl>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>easyrtcid</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>number</code></span>


            
            </td>

            

            

            <td class="description last">
                Id of the peer sending data.
                
            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>acceptor</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>callback</code></span>


            
            </td>

            

            

            <td class="description last">
                Need to be sets to access or refuse a call.
                
            </td>
        </tr>

    
    </tbody>
</table>
















</div>
            
                
<div class="section-method">

    

    <h4 class="name" id="~patrolReceivedCallback"><span class="type-signature"></span>patrolReceivedCallback<span class="signature">(easyrtcId, msgType, patrolJsonString)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for the patrol-plan data channel from easyrtc.
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="renderer.js.html">renderer.js</a>, <a href="renderer.js.html#line40">line 40</a>
    </li></ul></dd>
    

    

    

    
</dl>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>easyrtcId</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>number</code></span>


            
            </td>

            

            

            <td class="description last">
                Id of the peer sending data.
                
            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>msgType</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>String</code></span>


            
            </td>

            

            

            <td class="description last">
                Data channel the data are comming from.
                
            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>patrolJsonString</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>String</code></span>


            
            </td>

            

            

            <td class="description last">
                JSON string of the patrol data.
                
            </td>
        </tr>

    
    </tbody>
</table>
















</div>
            
                
<div class="section-method">

    

    <h4 class="name" id="~streamRequestCallback"><span class="type-signature"></span>streamRequestCallback<span class="signature">(easyrtc, msgType, msgData)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for the request-feed data channel msg from easyrtc.
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="renderer.js.html">renderer.js</a>, <a href="renderer.js.html#line64">line 64</a>
    </li></ul></dd>
    

    

    

    
</dl>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>easyrtc</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>number</code></span>


            
            </td>

            

            

            <td class="description last">
                Id of the peer sending data.
                
            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>msgType</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>String</code></span>


            
            </td>

            

            

            <td class="description last">
                Data channel the data are comming from.
                
            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>msgData</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>String</code></span>


            
            </td>

            

            

            <td class="description last">
                String of the requested string name.
                
            </td>
        </tr>

    
    </tbody>
</table>
















</div>
            
                
<div class="section-method">

    

    <h4 class="name" id="~teleopCallback"><span class="type-signature"></span>teleopCallback<span class="signature">(easyrtc, msgType, msgData)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for the joystick-position data channel from easyrtc.
</div>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="renderer.js.html">renderer.js</a>, <a href="renderer.js.html#line52">line 52</a>
    </li></ul></dd>
    

    

    

    
</dl>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>easyrtc</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>number</code></span>


            
            </td>

            

            

            <td class="description last">
                Id of the peer sending data.
                
            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>msgType</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>String</code></span>


            
            </td>

            

            

            <td class="description last">
                Data channel the data are comming from.
                
            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>msgData</code></td>
            

            <td class="type">
            
                
<span class="param-type"><code>String</code></span>


            
            </td>

            

            

            <td class="description last">
                JSON string of the teleop datas.
                
            </td>
        </tr>

    
    </tbody>
</table>
















</div>
            
    

    
</article>

</section>




</div>

<br class="clear">

<footer>
    Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 26 2019 14:19:31 GMT-0400 (Eastern Daylight Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>